home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / applications / wp / ttx2_sasc.lha / Rexx / TTX_SASC / GetFilePart < prev    next >
Encoding:
Text File  |  1994-10-24  |  409 b   |  22 lines

  1.  
  2. /** $VER: GetFilePart 1.0 (23.10.94)
  3.  **
  4.  ** Extracts the file name from a full file specification.
  5.  ** So long as that spec is valid, this should not fail.
  6.  **
  7.  ** Written by Kenneth Yarnall.  This code may be freely distributed.
  8.  **/
  9.  
  10. GetFilePart:
  11.  
  12. Parse ARG path
  13.  
  14. dirend = LastPos('/', path)
  15. if dirend = 0 then
  16.     dirend = Pos(':',path)
  17. if dirend ~= 0 then
  18.     file = SubStr(path,dirend+1)
  19.  
  20. Return file
  21.  
  22.